INCLUDE(FILES.cmake)

## Use wxWidgets
SET(wxWidgets_USE_LIBS base core html aui adv)
INCLUDE(FindwxWidgets REQUIRED)
INCLUDE(UsewxWidgets)

LINK_DIRECTORIES($ENV{HOME}/lib)

INCLUDE_DIRECTORIES( BEFORE ../3rd/include ./common )

############################# libdaodictv ####################################

ADD_LIBRARY(daodictv SHARED ${daodictv_srcs} ../3rd/wxsqlite3/wxsqlite3.cpp
                            ../3rd/sqlite3/sqlite3.c)
TARGET_LINK_LIBRARIES(daodictv ${wxWidgets_LIBRARIES})

############################# daodict ####################################

ADD_EXECUTABLE(daodict WIN32 ${daodict_srcs})
TARGET_LINK_LIBRARIES(daodict daodictv ${wxWidgets_LIBRARIES})

############################# bgl2txt ####################################

ADD_EXECUTABLE(dao_bgl2txt ${bgl2txt_srcs})
TARGET_LINK_LIBRARIES(dao_bgl2txt daodictv ${wxWidgets_LIBRARIES})

############################# txt2dao ####################################

ADD_EXECUTABLE(dao_txt2dict ${txt2dict_srcs})
TARGET_LINK_LIBRARIES(dao_txt2dict daodictv ${wxWidgets_LIBRARIES})

############################# dictpack ####################################

ADD_EXECUTABLE(dao_dictpack ${dictpack_srcs})
TARGET_LINK_LIBRARIES(dao_dictpack daodictv ${wxWidgets_LIBRARIES})

